package com.action.gulimall.thridparty.controller;

import com.action.common.utils.R;
import com.action.gulimall.thridparty.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sl shilun217@qq.com
 * @Deacription TODO
 * @date 2021/06/28/20:10
 **/
@RestController
@RequestMapping("/sms")
public class SmsController {

    @Autowired
    SmsService smsService;

    @GetMapping(value = "/sendCode")
    public R sendSmsCode(@RequestParam("phone") String phone, @RequestParam("code") String code){
        smsService.sendCode(phone,code);
        return R.ok();
    }
}
